package com.lbw.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.Map;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author lbw
 * @since 2020-09-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("question_entity")
@ApiModel(value="QuestionEntity对象", description="")
public class QuestionEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "题目id")
    @TableId(value = "id", type = IdType.UUID)
    private String id;

    @ApiModelProperty(value = "题目文字")
    @TableField(value = "name",condition = SqlCondition.LIKE)
    private String name;

    @ApiModelProperty(value = "正确答案")
    @TableField(value = "right_answer")
    private String rightAnswer;

    @ApiModelProperty(value = "解析")
    @TableField(value = "parsing")
    private String parsing;

    @ApiModelProperty(value = "所属章节")
    @TableField(value = "chapter")
    private String chapter;

    @ApiModelProperty(value = "所属科目")
    @TableField(value = "material_topic")
    private String materialTopic;

    @ApiModelProperty(value = "所属科目")
    @TableField(value = "subject")
    private String subject;

    @ApiModelProperty(value = "题目类型（1、行测，2、申论）")
    @TableField(value = "type")
    private Integer type;

    @ApiModelProperty(value = "选项")
    @TableField(value = "answer_options")
    private String answerOptions;

    @ApiModelProperty(value = "分值")
    @TableField(value = "score")
    private Integer score;

    @ApiModelProperty(value = "申论编号")
    @TableField(value = "comment_id")
    private String commentId;

    @ApiModelProperty(value = "申论题目排序")
    @TableField(value = "comment_page")
    private Integer commentPage;

    @ApiModelProperty(value = "选项Map集合,（不传参）")
    @TableField(exist = false)
    private ArrayList<Map<String, String>> optionsList;

    @ApiModelProperty(value = "用户创建时间,（不传参）")
    @TableField(value = "create_date",fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat( pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createDate;

    @ApiModelProperty(value = "删除状态,（不传参）")
    @TableField(value = "del_flag")
    @TableLogic
    private Integer delFlag;

    @ApiModelProperty(value = "申论得分,（不传参）")
    @TableField(exist = false)
    private Integer commentScore;


}
